{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "8b04402a-0961-4d2b-ad34-caa7ce8570c1",
   "metadata": {},
   "source": [
    "https://leetcode.com/problems/find-k-pairs-with-smallest-sums"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ace2c48e-7d72-46f7-897a-9c9e4b32b655",
   "metadata": {},
   "source": [
    "# 2023/01/23\n",
    "\n",
    "Timeout\n",
    "\n",
    "```python\n",
    "class Solution:\n",
    "    def kSmallestPairs(self, nums1: List[int], nums2: List[int], k: int) -> List[List[int]]:\n",
    "        #2023/01/23 07:54\n",
    "        result = []\n",
    "        for n1 in nums1:\n",
    "            for n2 in nums2:\n",
    "                result.append([n1+n2, n1, n2])\n",
    "        result.sort(key=lambda x: x[0])\n",
    "        return [one[1:] for one in result[:k]]\n",
    "        #2023/01/23 08:04\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8d38b517-8230-49e7-8bcc-e87b14a33a8a",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
